package com.dm.controller;

import com.dm.common.Dto;
import com.dm.service.LocalUserService;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/user/api")
public class UserController {

    @Resource
    private LocalUserService localUserService;

    @RequestMapping(value = "/userLogin",method = RequestMethod.POST)
    public Dto userLogin(String phone, String password)throws Exception{
        return localUserService.userLogin(phone,password);
    }
    @RequestMapping(value = "/userOut",method = RequestMethod.POST)
    public Dto outUser(String token)throws Exception{
        return localUserService.outUser(token);
    }
}
